GENERAL_RECEIPT_HANDLER = {
    "number": lambda content: (content.replace("\n", "")),
    "date": lambda content: (
        content.replace("\n", "")
        .replace("年", "/")
        .replace("月", "/")
        .replace("日", "")
    ),
    "buyer_name": lambda content: (content.replace("\n", "")),
    "buyer_id": lambda content: (content.replace("\n", "")),
    "seller_name": lambda content: (content.replace("\n", "")),
    "seller_id": lambda content: (content.replace("\n", "")),
    "total": lambda content: (content.replace("¥", "").split("\n")[0]),
    "total_tax": lambda content: (content.replace("¥", "").split("\n")[1]),
    "total_big": lambda content: (content.replace("¥", "").split("\n")[0]),
    "total_num": lambda content: (content.replace("¥", "").split("\n")[1]),
    "handler_name": lambda content: (content.replace("\n", "")),
    "item_name": lambda content: (content.split("\n")[0]),
    "item_tax_rate": lambda content: (content.split("\n")[1]),
    "item_price": lambda content: (content.split("\n")[2]),
    "item_tax": lambda content: (content.split("\n")[3]),
    "remark": lambda content: (content.replace("\n", "")),
}

VAT_RECEIPT_HANDLER = {
    "code": lambda content: (content.replace("\n", "")),
    "number": lambda content: (content.replace("\n", "")),
    "date": lambda content: (content.replace("\n", "").replace("  ", "/")),
    "check": lambda content: (content.replace("\n", "").replace(" ", "")),
    "password": lambda content: (content.replace("\n", "")),
    "machine_code": lambda content: (content.replace("\n", "")),
    "buyer_name": lambda content: (content.split("\n")[0]),
    "buyer_id": lambda content: (content.split("\n")[1]),
    "buyer_address": lambda content: (content.split("\n")[2]),
    "buyer_account": lambda content: (content.replace("\n", "")),
    "seller_name": lambda content: (content.split("\n")[0]),
    "seller_id": lambda content: (content.split("\n")[1]),
    "seller_address": lambda content: (content.split("\n")[2]),
    "seller_account": lambda content: (content.replace("\n", "")),
    "total": lambda content: (content.replace("¥", "").split("\n")[0]),
    "total_tax": lambda content: (content.replace("¥", "").split("\n")[1]),
    "total_big": lambda content: (content.replace("¥", "").split("\n")[3]),
    "total_num": lambda content: (content.replace("¥", "").split("\n")[2]),
    "payee_name": lambda content: (content.split("\n")[0]),
    "reviewer_name": lambda content: (content.split("\n")[1]),
    "handler_name": lambda content: (content.split("\n")[2]),
    "item_name": lambda content: (content.split("\n")[0]),
    "item_tax_rate": lambda content: (content.split("\n")[:-1][-2]),
    "item_price": lambda content: (content.split("\n")[:-1][-3]),
    "item_tax": lambda content: (content.split("\n")[:-1][-1]),
    "remark": lambda content: (content.replace("\n", "")),
}
